package security;


public class CoreRoleEnum {

	// 超级管理员
	public static final CoreRoleEnum ROLE_SUPER_ADMIN = new CoreRoleEnum(
			"ROLE_SUPER_ADMIN", 1);

	// 管理员
	public static final CoreRoleEnum ROLE_ADMIN = new CoreRoleEnum(
			"ROLE_ADMIN", 2);

	// 一般用户
	public static final CoreRoleEnum ROLE_GENERAL = new CoreRoleEnum(
			"ROLE_GENERAL", 4);


  public static final CoreRoleEnum[] ROLES = { ROLE_SUPER_ADMIN, ROLE_ADMIN,
			ROLE_GENERAL };

  private final int roleBit;

  private final String name;

  private CoreRoleEnum(String name, int bit) {
    this.name = name;
    this.roleBit = bit;
  }

  public int getRoleBit() {
    return roleBit;
  }

  public String toString() {
    return name;
  }
}
